package com.wx.javacode.poly_.polyparameter_;

/**
 * ClassName:Manager
 * Package :com.wx.javacode.poly_.polyparameter_
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/5/21 - 20:31
 */
public class Manager extends Employee {
    private double bonus;

    public Manager(String name, double salary, double bonus) {
        super(name, salary);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    //重写获取年薪方法
    @Override
    public double getAnnual() {
        return super.getAnnual() + bonus;
    }

    public void manage() {
        System.out.println("经理" + getName() + "is managing");
    }
}
